<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>逗号运算符</title>
</head>

<body>
    <script>
        var i = 0,
            j = 0;
        for (; i < 10, j < 6; i++, j++) {
            k = i + j;
        }
        console.log(k); //10
        // 逗号运算符的作用：可以按顺序连接两个表达式，先从左到右估算所有运算数，然后返回最后一个运算数的值
    </script>
</body>

</html>